package top.appx.util;

import top.appx.vo.Result;

/**
 * Created by lhzxd on 2017/5/3.
 */
public class ResultUtil {
    public static Result success(Object object){
        Result result = new Result();
        result.setSuccess(true);
        result.setData(object);
        return result;
    }
    public static Result success(){
        return success(null);
    }

    public static Result error(String msg){
        Result result = new Result();
        result.setSuccess(false);
        result.setMsg(msg);
        return result;
    }
}
